<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBrokerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('broker', function (Blueprint $table) {
            $table->increments('id');
            $table->string('uid')->default('')->comment('经纪人');
            $table->integer('new_house')->default('0')->comment('新房');
            $table->integer('two_house')->default('0')->comment('二手房');
            $table->integer('rental_housing')->default('0')->comment('出租房');
            $table->string('company')->default('')->comment('公司');
            $table->tinyInteger('state')->comment('1是在在职，0是离职');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('broker');
    }
}
